<template>
	<view class="wf-box">
		<view class="head" :style="{ paddingTop: navBarHeight }">
			<view class="head-np">
				<view class="back" @click="back()">
					<image src="@/static/img/me-43.png"></image>
				</view>
				<view class="title"></view>
				<view></view>
			</view>
		</view>
		<image class="top_bg" src="@/static/img/invite_bg.png" mode="widthFix"></image>

		<view class="info">
			<view class="title">
				<view>我的邀请码</view>
				<view>暂未绑定，绑定后激活</view>
			</view>
			<view class="code">0b275...6954</view>
			<view class="title">我的邀请人</view>
			<view class="bin">
				<input type="text" />
				<view>绑定</view>
			</view>
		</view>

		<view class="main" :style="{ paddingTop: navBarHeight }">
			<view class="friend">
				<view class="title">数据概览</view>
				<view class="items">
					<view class="item">
						<view>0</view>
						<view>团队好友总数</view>
					</view>
					<view class="item">
						<view>0</view>
						<view>我邀请的好友</view>
					</view>
					<view class="item">
						<view>0</view>
						<view>累计收获社交值</view>
					</view>
				</view>
			</view>
			<view class="friend record">
				<view class="title">邀请记录</view>
				<view class="search">
					<image src="@/static/img/search.png" mode="widthFix"></image>
					<input type="text" placeholder="请输入用户昵称、钱包地址" />
				</view>
				<view class="tab">
					<view class="tab_item">
						<view :class="{'col_9':index==0}">每日活跃</view>
						<image src="@/static/img/invite_up.png" mode="widthFix"></image>
					</view>
					<view class="tab_item">
						<view :class="{'col_9':index==1}">累计活跃</view>
						<image src="@/static/img/invite_up.png" mode="widthFix"></image>
					</view>
				</view>
				<view class="not">
					<image src="@/static/img/not-icon.png" mode="widthFix"></image>
					<view>暂无数据</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import navBarMixin from '@/mixin/navBarMixin.js'
	export default {
		data() {
			return {
				imagelist: [
					'../../static/img/v0.png',
					'../../static/img/v1.png',
					'../../static/img/v2.png',
					'../../static/img/v3.png',
					'../../static/img/v4.png',
					'../../static/img/v5.png',
					'../../static/img/v6.png',
					'../../static/img/v7.png',
					'../../static/img/v8.png',
					'../../static/img/v9.png',
					'../../static/img/v10.png',
				],
				index: 1
			}
		},
		mixins: [navBarMixin],
		methods: {
			back() {
				uni.navigateBack()
			},
			record() {
				uni.navigateTo({
					url: '/pages/me/rechargeRecord'
				})
			},
			signin() {
				uni.navigateTo({
					url: '/pages/me/signin'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wf-box {
		position: relative;
		// overflow: hidden;
		height: 100vh;
		background-size: 100% 100%;
	}

	.head {
		position: fixed;
		z-index: 1;
		width: 100%;
		background: transparent;

		.head-np {
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;
			height: 96rpx;
			padding: 0 30rpx;
			box-sizing: border-box;

			.back {
				image {
					width: 20rpx;
					height: 37rpx;
				}
			}

			.title {
				font-size: 36rpx;
				font-weight: bold;
				color: white;
			}

			.text {
				color: #E7C9B1;
				font-size: 30rpx;
			}
		}
	}

	.top_bg {
		width: 100%;
		display: block;
		// position: absolute;
		// top: 0;
		// left: 0;
	}

	.info {
		width: 630rpx;
		height: 406rpx;
		background-color: white;
		margin: 0 30rpx;
		padding: 0 30rpx;
		margin-top: 176rpx;
		border-radius: 15rpx;
		position: absolute;
		top: 220rpx;
		left: 0;
		white-space: nowrap;
		overflow: hidden;

		.title {
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 30rpx;
			margin-top: 30rpx;

			view {
				&:nth-of-type(2) {
					font-size: 26rpx;
					color: #999999;
				}
			}
		}

		.code {
			width: 630rpx;
			height: 84rpx;
			line-height: 84rpx;
			background: #F4F4F4;
			border-radius: 6rpx;
			text-align: center;
			font-size: 30rpx;
			color: #999999;
			margin-top: 20rpx;
		}

		.bin {
			display: flex;
			justify-content: space-between;
			margin-top: 20rpx;

			input {
				width: 440rpx;
				height: 83rpx;
				background: #EBF3FF;
				border-radius: 6rpx;
			}

			view {
				width: 150rpx;
				height: 84rpx;
				line-height: 84rpx;
				text-align: center;
				background: #58A1FF;
				border-radius: 6rpx;
				font-size: 30rpx;
				color: #FFFFFF;
			}
		}
	}

	.main {
		// margin-top: 176rpx;
		position: relative;
		margin-top: -20rpx;
		z-index: 888;
		overflow: hidden;
		padding: 30rpx;

		.friend {
			background: #FFFFFF;
			border-radius: 16rpx;
			padding: 30rpx 30rpx 40rpx;

			.title {
				font-weight: 500;
				font-size: 34rpx;
			}

			.items {
				display: flex;
				justify-content: space-between;
				text-align: center;
				margin-top: 40rpx;

				.item {
					view {
						&:nth-of-type(1) {
							font-weight: 500;
							font-size: 38rpx;
						}

						&:nth-of-type(2) {
							font-size: 25rpx;
							color: #666666;
							margin-top: 14rpx;
						}
					}
				}
			}
		}

		.record {
			.search {
				display: flex;
				align-items: center;
				height: 73rpx;
				background: #F6F6F6;
				border-radius: 42rpx;
				margin-top: 30rpx;

				image {
					width: 42rpx;
					margin: 0 20rpx 0 30rpx;
				}

				input {
					flex: 1;
					font-size: 26rpx;
					margin-right: 30rpx;
				}
			}

			.tab {
				display: flex;
				align-items: center;
				margin-top: 40rpx;

				.tab_item {
					display: flex;
				}

				image {
					width: 42rpx;
					margin: 0 60rpx 0 10rpx;
				}
			}

			.col_9 {
				color: #999999;
			}
		}

		.not {
			text-align: center;
			margin-top: 80rpx;
			image {
				width: 356rpx;
			}
			view {
				font-size: 26rpx;
				color: #999999;
				margin-top: 20rpx;
			}
		}
	}
</style>